package com.wencai.bean;

import java.util.Objects;

/**
 * @author wangpan
 * @date 2023/4/10
 */
public class Duizi {
    private String name;
    private Double price;
    private String date;
    private Integer times;
    private String business;
    private Double mount;

    public Duizi(String name, Double price, String date, Integer times, String business, Double mount) {
        this.name = name;
        this.price = price;
        this.date = date;
        this.times = times;
        this.business = business;
        this.mount = mount;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public Integer getTimes() {
        return times;
    }

    public void setTimes(Integer times) {
        this.times = times;
    }

    public String getBusiness() {
        return business;
    }

    public void setBusiness(String business) {
        this.business = business;
    }

    public Double getMount() {
        return mount;
    }

    public void setMount(Double mount) {
        this.mount = mount;
    }

    @Override
    public String toString() {
        return name + "\t" + price + "\t" + date + "\t" + times + "\t" + business + "\t" + mount;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Duizi duizi = (Duizi) o;
        return Objects.equals(name, duizi.name) &&
                Objects.equals(price, duizi.price) &&
                Objects.equals(date, duizi.date) &&
                Objects.equals(times, duizi.times) &&
                Objects.equals(business, duizi.business) &&
                Objects.equals(mount, duizi.mount);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, price, date, times, business, mount);
    }
}
